package com.rk.dao;

import com.rk.entity.Customer;
import org.apache.ibatis.annotations.*;

import java.util.List;


public interface CustomerDao
{
    @Insert("insert into customers(name,city,email,phone) " +
            "values(#{name},#{city},#{email},#{phone})")
    public void addCustomer(Customer customer);

    @Select("select * from customers")
    public List<Customer> selectCustomer();

    @Update("update customers set " +
            "name=#{name}," +
            "city=#{city}," +
            "email=#{email}," +
            "phone=#{phone} where id=#{id}")
    public void updateByID(Customer customer);

    @Delete("delete from customers where id=#{id}")
    public void deleteByID(Customer customer);
}
